package logic;

/**
 *
 * @author Merete, Mirna, Esben, Knut og Stian
 *
 */
public class Motion {

	/*
	 * xVelocity		= the object's horizontal velocity
	 * yVelocity		= the object's vertical velocity
	 * xAcceleration	= the object's horizontal acceleration
	 * yAcceleration	= the object's vertical acceleration
	 */
	private double horizontalVelocity;
	private double verticalVelocity;
	private double horizontalAcceleration;
	private double verticalAcceleration;

	public Motion () {
		horizontalVelocity = 0;
		verticalVelocity = 0;
		horizontalAcceleration = 0;
		verticalAcceleration = 0;
	}

	/*
	 * MOVE THESE TWO METHODS OUTSIDE THE CLASS AND USE THE SETTERS INSTEAD?
	 */
	public void switchHorizontalDirection() {
		horizontalVelocity = -1*horizontalVelocity;
		horizontalAcceleration = -1*horizontalAcceleration;
	}

	public void switchVerticalDirection() {
		verticalVelocity = -1*verticalVelocity;
		verticalAcceleration = -1*verticalAcceleration;
	}

	/*
	 * GETTERS AND SETTERS:
	 */
	public double getHorizontalVelocity() {
		return horizontalVelocity;
	}

	public void setHorizontalVelocity(double xv) {
		this.horizontalVelocity = xv;
	}

	public double getVerticalVelocity() {
		return verticalVelocity;
	}

	public void setVerticalVelocity(double yv) {
		this.verticalVelocity = yv;
	}

	public double getHorizontalAcceleration() {
		return horizontalAcceleration;
	}

	public void setHorizontalAcceleration(double accX) {
		this.horizontalAcceleration = accX;
	}

	public double getVerticalAcceleration() {
		return verticalAcceleration;
	}

	public void setVerticalAcceleration(double accY) {
		this.verticalAcceleration = accY;
	}
}
